home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir36
/
zipall12.zip
/
ZIPALL.BAT
< prev
next >
Wrap
DOS Batch File
|
1993-09-15
|
2KB
|
52 lines
@echo off
REM
REM ZIPALL.BAT
REM
REM This BAT file can be executed from within any subdirectory to cause PKZIP
REM to implode every file in the current directory and every file in its child
REM directories (if any) into a single file called ALLFILES.ZIP. All the ori-
REM ginal files are moved (-m) into the ZIP file, the child subdirectories,
REM if any, will be removed and the current subdirectory will be
REM empty except for ALLFILES.ZIP. Hidden and System files are zipped also
REM and the file attributes for Hidden, System and Readonly files are retained.
REM Use the UNZIPALL.BAT file when necessary. Use ZIPALLT.BAT to accomplish the
REM same feat while retaining the original files (copy instead of move).
REM ALLFILES.ZIP should be unzipped with the "-d -Jhrs" switches if
REM PKUNZIP.EXE is used instead of UNZIPALL.BAT.
REM
if not exist allfiles.zip goto continue
cls
dir /w
echo.
echo This directory contains an ALLFILES.ZIP already. Run RESTZIP.BAT to restore
echo ALLFILES.ZIP as the only file in the directory (if you have no need to
echo save any changes made to the other files) - OR - delete ALLFILES.ZIP and
echo run ZIPALL again (to recompress the other files, saving changes.) RESTZIP
echo is much faster than ZIPALL -- especially for large subdirectories.
goto exit
:continue
if not exist zipall1.usd goto contin2
echo.
echo This directory contains ZIPALL1.USD -- indicating ZIPALL1.BAT had been used
echo previously to zip only the contents of current subdirectory and not any
echo children subdirectories. If you really want to do ZIPALL, delete the
echo ZIPALL1.USD file first and then execute ZIPALL.
goto exit
:contin2
pkzip allfiles *.* -ex -rp -whs -Jhrs -m
if errorlevel 1 goto errexit
attrib -h -s -r *.*
pdel allfiles.zip /o /eq /ba /wh /nt
dir /ad /b | feed eatdir.bat
dir
echo.
echo ALLFILES.ZIP has been successfully created, moving the original files.
echo Child subdirectories, if any, have been removed.
echo Use UNZIPALL.BAT to unzip, or PKUNZIP.EXE with the "-d -Jhrs" switches.
goto exit
:errexit
echo Error in execution of PKZIP (via ZIPALL.BAT).
:exit
prompt $p$g
echo on